import request from '@/utils/request'

export const getSaleOrderList = (data:any, params:any) => {
	return request({
	    url:'/mall/platform/order/sale/list',
	    method:'post',
	    data:data,
	    params:params,
		noLoading:data.noLoading,
	})
}

export const getSaleOrderDetail = (data:any) => {
	return request({
	    url:`/mall/platform/order/sale/detail/${data.id}`,
	    method:'post',
	    data:data
	})
}

export const setPurchaseOrderStatus = (data:any) => {
	return request({
	    url:`/mall/platform/order/updateBuyOrderStatus/${data.id}/${data.status}`,
	    method:'post',
	    data:{}
	})
}

export const getPurchaseOrderList = (data:any, params:any) => {
	return request({
	    url:'/mall/platform/order/buy/list',
	    method:'post',
	    data:data,
	    params:params,
		noLoading:data.noLoading,
	})
}

export const getPurchaseOrderDetail = (data:any) => {
	return request({
	    url:`/mall/platform/order/buy/detail/${data.id}`,
	    method:'post',
	    data:data
	})
}

export const setSaleOrderStatus = (data:any) => {
	return request({
	    url:`/mall/platform/order/updateSaleOrderStatus/${data.id}/${data.status}`,
	    method:'post',
	    data:{}
	})
}


export const getOrderLog = (data:any) => {
	return request({
	    url:'/mall/platform/order/platform/order/log?orderId=' + data.orderId,
	    method:'post',
	})
}


export const getPayList = (data:any) => {
	return request({
	    url:`/mall/platform/order/order/payment/${data.id}`,
	    method:'post'
	})
}

export const setPayAdd = (data:any) => {
	return request({
	    url:'/mall/platform/order/add/order/payment',
	    method:'post',
	    data: data
	})
}

export const setPayEdit = (data:any) => {
	return request({
	    url:'/mall/platform/order/edit/order/payment',
	    method:'post',
	    data: data
	})
}

export const getOrderSummary = (data:any) => {
	return request({
	    url:'/mall/platform/order/orderSummary',
	    method:'post',
	    data: data
	})
}




